package com.yc.sole.financial.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.sole.common.domain.StateCountResp;
import com.yc.sole.financial.entity.Receipt;
import com.yc.sole.financial.request.ReceiptQueryReq;
import com.yc.sole.financial.response.ReceiptResp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper数据操作类
 *
 * @author yizuomin
 * @date 2024-03-08
 **/
public interface ReceiptMapper extends BaseMapper<Receipt> {

    /**
     * @param id
     * @return
     */
    ReceiptResp selectReceiptById(@Param("id") Long id);

    /**
     * @param page
     * @param queryReq
     * @return
     */
    Page<ReceiptResp> selectReceiptPage(Page page, @Param("bean") ReceiptQueryReq queryReq);

    /**
     * 查询收款方式数量
     *
     * @param queryReq
     * @return
     */
    List<StateCountResp> selectReceiptMethodCount(@Param("bean") ReceiptQueryReq queryReq);
}
